<?php
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
defined('YII_DEBUG') or define('YII_DEBUG',true);

$rootPath = dirname(__FILE__);

require($rootPath . '/vendor/yii/framework/yii.php');
require($rootPath . '/common/YCmf.php');

$config = array();
$commonConfig = $rootPath . '/frontend/config/common.php';
$backendConfig = $rootPath . '/frontend/config/backend.php';
if (file_exists($commonConfig)) {
	$config = CMap::mergeArray($config, require($commonConfig));
}

if (file_exists($backendConfig )) {
	$config = CMap::mergeArray($config, require($backendConfig));
}

YCmf::createBackendApplication($config)->run();
